package com.expense.common.dao.auth;

import com.expense.common.config.BaseDao;
import com.expense.common.model.auth.AdminUserRole;
import org.beetl.sql.core.annotatoin.SqlResource;

import java.util.List;

@SqlResource("auth.adminUserRole")
public interface AdminUserRoleDao extends BaseDao<AdminUserRole> {

    List<Long> findRoleIdByUserId(Long userId);

    List<AdminUserRole> findByUserId(Long userId);

    List<Long> findUserIdByRoleId(Long roleId);

    List<Long> findUserIdByRoleIdAndDepartmentId(Long roleId,Long departmentId);

    AdminUserRole findByUserIdAndRoleId(Long userId,Long roleId);

    Integer deleteByUserId(Long userId, Long adminUserId);
}
